import Vue from 'vue'
import Router from 'vue-router'


// import Lgoin from '@/page/Login'
const Login = r => require.ensure([], () => r(require('@/page/Login')), 'login')

//import Home from '@/page/home/Home'
const Home = r => require.ensure([], () => r(require('@/page/home/Home')), 'home')


//import DataCenter from '@/page/data/DataCenter'
const DataCenter = r => require.ensure([], () => r(require('@/page/data/DataCenter')), 'dataCenter')

//import FuelData from '@/page/data/FuelData'
const FuelData = r => require.ensure([], () => r(require('@/page/data/FuelData')), 'fuelData')

//import FuelDataSearch from '@/page/data/FuelDataSearch'
const FuelDataSearch = r => require.ensure([], () => r(require('@/page/data/FuelDataSearch')), 'fuelDataSearch')

//import RechargeData from '@/page/data/RechargeData'
const RechargeData = r => require.ensure([], () => r(require('@/page/data/RechargeData')), 'rechargeData')

//import RechargeDataSearch from '@/page/data/RechargeDataSearch'
const RechargeDataSearch = r => require.ensure([], () => r(require('@/page/data/RechargeDataSearch')), 'rechargeDataSearch')


//import Detail from '@/page/detail/Detail'
const Detail = r => require.ensure([], () => r(require('@/page/detail/Detail')), 'detail')

//import DetailOnly from '@/page/detail/DetailOnly'
const DetailOnly = r => require.ensure([], () => r(require('@/page/detail/DetailOnly')), 'detailOnly')

//import DetailSearch from '@/page/detail/DetailSearch'
const DetailSearch = r => require.ensure([], () => r(require('@/page/detail/DetailSearch')), 'detailSearch')

//import My from '@/page/my/My'
const My = r => require.ensure([], () => r(require('@/page/my/My')), 'my')

//import MyInfo from '@/page/my/MyInfo'
const MyInfo = r => require.ensure([], () => r(require('@/page/my/MyInfo')), 'myInfo')

//import EditName from '@/page/my/EditName'
const EditName = r => require.ensure([], () => r(require('@/page/my/EditName')), 'editName')

//import MyTankerList from '@/page/my/tanker/MyTankerList'
const MyTankerList = r => require.ensure([], () => r(require('@/page/my/tanker/MyTankerList')), 'tankerList')

//import MyTanker from '@/page/my/tanker/MyTanker'
const MyTanker = r => require.ensure([], () => r(require('@/page/my/tanker/MyTanker')), 'myTanker')

//import TankerName from '@/page/my/tanker/TankerName'
const TankerName = r => require.ensure([], () => r(require('@/page/my/tanker/TankerName')), 'myTanker')

//import TankerPrice from '@/page/my/tanker/TankerPrice'
const TankerPrice = r => require.ensure([], () => r(require('@/page/my/tanker/TankerPrice')), 'myTanker')

//import TankerAddr from '@/page/my/tanker/TankerAddr'
const TankerAddr = r => require.ensure([], () => r(require('@/page/my/tanker/TankerAddr')), 'myTanker')

//import AddOli from '@/page/my/tanker/AddOli'
const AddOli = r => require.ensure([], () => r(require('@/page/my/tanker/AddOli')), 'tankerList')


//import ICInfo from '@/page/my/ic/ICInfo'
const ICInfo = r => require.ensure([], () => r(require('@/page/my/ic/ICInfo')), 'cardList')

//import Account from '@/page/my/ic/Account'
const Account = r => require.ensure([], () => r(require('@/page/my/ic/Account')), 'cardList')

//import ICUserInfo from '@/page/my/ic/ICUserInfo'
const ICUserInfo = r => require.ensure([], () => r(require('@/page/my/ic/ICUserInfo')), 'icCard')

//import ICRecharge from '@/page/my/ic/ICRecharge'
const ICRecharge = r => require.ensure([], () => r(require('@/page/my/ic/ICRecharge')), 'icCard')

//import ICName from '@/page/my/ic/ICName'
const ICName = r => require.ensure([], () => r(require('@/page/my/ic/ICName')), 'icCard')

//import ICTName from '@/page/my/ic/ICTName'
const ICTName = r => require.ensure([], () => r(require('@/page/my/ic/ICTName')), 'icCard')

//import ICAddr from '@/page/my/ic/ICAddr'
const ICAddr = r => require.ensure([], () => r(require('@/page/my/ic/ICAddr')), 'icCard')

//import Debit from '@/page/my/ic/Debit'
const Debit = r => require.ensure([], () => r(require('@/page/my/ic/Debit')), 'icCard')

//import ICWater from '@/page/my/ic/ICWater'
const ICWater = r => require.ensure([], () => r(require('@/page/my/ic/ICWater')), 'icCard')
const ICWaterBy = r => require.ensure([], () => r(require('@/page/my/ic/ICWaterBy')), 'icCard')


//import ICOnly from '@/page/my/ic/ICOnly'
const ICOnly = r => require.ensure([], () => r(require('@/page/my/ic/ICOnly')), 'icCard')

//import ICSearch from '@/page/my/ic/ICSearch'
const ICSearch = r => require.ensure([], () => r(require('@/page/my/ic/ICSearch')), 'icCard')

//import CardFlowSearch from '@/page/my/ic/CardFlowSearch'
const CardFlowSearch = r => require.ensure([], () => r(require('@/page/my/ic/CardFlowSearch')), 'icCard')

//import EventList from '@/page/my/event/EventList'
const EventList = r => require.ensure([], () => r(require('@/page/my/event/EventList')), 'event')

//import EventDetail from '@/page/my/event/EventDetail'
const EventDetail = r => require.ensure([], () => r(require('@/page/my/event/EventDetail')), 'event')

//import EventSearch from '@/page/my/event/EventSearch'
const EventSearch = r => require.ensure([], () => r(require('@/page/my/event/EventSearch')), 'event')


//import Pass from '@/page/my/pass/Pass'
const Pass = r => require.ensure([], () => r(require('@/page/my/pass/Pass')), 'pass')

//import PassModify from '@/page/my/pass/PassModify'
const PassModify = r => require.ensure([], () => r(require('@/page/my/pass/PassModify')), 'pass')

//import PassModify1 from '@/page/my/pass/PassModify1'
const PassModify1 = r => require.ensure([], () => r(require('@/page/my/pass/PassModify1')), 'pass')

//import PassEdit from '@/page/my/pass/PassEdit'
const PassEdit = r => require.ensure([], () => r(require('@/page/my/pass/PassEdit')), 'pass')

//import PassForget from '@/page/my/pass/PassForget'
const PassForget = r => require.ensure([], () => r(require('@/page/my/pass/PassForget')), 'pass')

//import PassForget1 from '@/page/my/pass/PassForget1'
const PassForget1 = r => require.ensure([], () => r(require('@/page/my/pass/PassForget1')), 'pass')


//import NoticeList from '@/page/my/note/NoticeList'
const NoticeList = r => require.ensure([], () => r(require('@/page/my/note/NoticeList')), 'note')

//import NoticeInfo from '@/page/my/note/NoticeInfo'
const NoticeInfo = r => require.ensure([], () => r(require('@/page/my/note/NoticeInfo')), 'note')


//import Help from '@/page/my/help/Help'
const Help = r => require.ensure([], () => r(require('@/page/my/help/Help')), 'help')

//import HelpInfo from '@/page/my/help/HelpInfo'
const HelpInfo = r => require.ensure([], () => r(require('@/page/my/help/HelpInfo')), 'help')
const PlatInfo = r => require.ensure([], () => r(require('@/page/my/help/PlatInfo')), 'help')



//import Retrieval1 from '@/page/retrieval/Retrieval1'
const Retrieval1 = r => require.ensure([], () => r(require('@/page/retrieval/Retrieval1')), 'retrieval')

//import Retrieval2 from '@/page/retrieval/Retrieval2'
const Retrieval2 = r => require.ensure([], () => r(require('@/page/retrieval/Retrieval2')), 'retrieval')

//import Retrieval3 from '@/page/retrieval/Retrieval3'
const Retrieval3 = r => require.ensure([], () => r(require('@/page/retrieval/Retrieval3')), 'retrieval')

//import Retrieval4 from '@/page/retrieval/Retrieval4'
const Retrieval4 = r => require.ensure([], () => r(require('@/page/retrieval/Retrieval4')), 'retrieval')

//import Well from '@/page/wel'
const Well = r => require.ensure([], () => r(require('@/page/Well')), 'well')


Vue.use(Router)
export default new Router({
    mode: 'history',
    routes: [{
        path: '/login',
        name: 'login',
        component: Login,
        meta: {
            level: 1
        }
    }, {
        path: '/',
        name: 'home',
        component: Home,
        meta: {
            level: 1
        }
    }, {
        path: '/my',
        name: 'my',
        component: My,
        meta: {
            level: 1
        }
    }, {
        path: '/myInfo',
        name: 'myInfo',
        component: MyInfo,
        meta: {
            level: 2
        }
    }, {
        path: '/editName',
        name: 'editName',
        component: EditName,
        meta: {
            level: 3
        }
    }, {
        path: '/myTankerList',
        name: 'myTankerList',
        component: MyTankerList,
        meta: {
            level: 2
        }
    }, {
        path: '/myTanker/:index',
        name: 'myTanker',
        component: MyTanker,
        meta: {
            level: 3
        }
    }, {
        path: '/tankerName/:index',
        name: 'tankerName',
        component: TankerName,
        meta: {
            level: 4
        }
    }, {
        path: '/tankerPrice/:index',
        name: 'tankerPrice',
        component: TankerPrice,
        meta: {
            level: 4
        }
    }, {
        path: '/tankerAddr/:index',
        name: 'tankerAddr',
        component: TankerAddr
        ,
        meta: {
            level: 4
        }
    }, {
        path: '/addOli/:index',
        name: 'addOli',
        component: AddOli,
        meta: {
            level: 4
        }
    },
        //ic卡路由
        {
            path: '/icSearch',
            name: 'icSearch',
            component: ICSearch,
            meta: {
                level: 3
            }
        },
        {
            path: '/icInfo',
            name: 'icInfo',
            component: ICInfo,
            meta: {
                level: 2
            }
        }, {
            path: '/account/:which/:index',
            name: 'account',
            component: Account,
            meta: {
                level: 5
            }
        },  {
            path: '/icUserInfo/:which/:index',
            name: 'icUserInfo',
            component: ICUserInfo,
            meta: {
                level: 4
            }
        }, {
            path: '/debit/:which/:index',
            name: 'debit',
            component: Debit,
            meta: {
                level: 5
            }
        }, {
            path: '/icRecharge',
            name: 'icRecharge',
            component: ICRecharge
        }, {
            path: '/icName/:which/:index',
            name: 'icName',
            component: ICName,
            meta: {
                level: 5
            }
        }, {
            path: '/icTName/:which/:index',
            name: 'icTName',
            component: ICTName,
            meta: {
                level: 5
            }
        }, {
            path: '/cardFlowSearch',
            name: 'cardFlowSearch',
            component: CardFlowSearch,
            meta: {
                level: 4
            }
        }, {
            path: '/icAddr/:which/:index',
            name: 'icAddr',
            component: ICAddr,
            meta: {
                level: 5
            }
        }, {
            path: '/retrieval1',
            name: 'retrieval1',
            component: Retrieval1,
            meta: {
                level: 2
            }
        }, {
            path: '/retrieval2',
            name: 'retrieval2',
            component: Retrieval2,
            meta: {
                level: 3
            }
        }, {
            path: '/retrieval3',
            name: 'retrieval3',
            component: Retrieval3,
            meta: {
                level: 4
            }
        }, {
            path: '/retrieval4',
            name: 'retrieval4',
            component: Retrieval4,
            meta: {
                level: 5
            }
        }, {
            path: '/dataCenter',
            name: 'dataCenter',
            component: DataCenter,
            meta: {
                level: 1
            }
        }, {
            path: '/detail',
            name: 'detail',
            component: Detail,
            meta: {
                level: 1
            }
        }, {
            path: '/detailBy',
            name: 'detailBy',
            component: Detail,
            meta: {
                level: 3
            }
        }, {
            path: '/detailOnly/:index',
            name: 'detailOnly',
            component: DetailOnly,
            meta: {
                level: 4
            }
        }, {
            path: '/detailSearch',
            name: 'detailSearch',
            component: DetailSearch,
            meta: {
                level: 2
            }
        },{
            path: '/fuelData',
            name: 'fuelData',
            component: FuelData,
            meta: {
                level: 2
            }
        },{
            path: '/fuelDataBy',
            name: 'fuelDataBy',
            component: FuelData,
            meta: {
                level: 4
            }
        }, {
            path: '/fuelDataSearch',
            name: 'fuelDataSearch',
            component: FuelDataSearch,
            meta: {
                level: 3
            }
        },{
            path: '/rechargeData',
            name: 'rechargeData',
            component: RechargeData,
            meta: {
                level: 2
            }
        },{
            path: '/rechargeDataBy',
            name: 'rechargeDataBy',
            component: RechargeData,
            meta: {
                level: 4
            }
        }, {
            path: '/rechargeDataSearch',
            name: 'rechargeDataSearch',
            component: RechargeDataSearch,
            meta: {
                level: 3
            }
        }, {
            path: '/icWater',
            name: 'icWater',
            component: ICWater,
            meta: {
                level: 3
            }
        },  {
            path: '/icWaterBy',
            name: 'icWaterBy',
            component: ICWaterBy,
            meta: {
                level: 5
            }
        }, {
            path: '/icOnly/:index',
            name: 'icOnly',
            component: ICOnly,
            meta: {
                level: 6
            }
        }, {
            path: '/eventList',
            name: 'eventList',
            component: EventList,
            meta: {
                level: 2
            }
        }, {
            path: '/eventListSearch',
            name: 'eventListSearch',
            component: EventList,
            meta: {
                level: 4
            }
        },{
            path: '/eventDetail',
            name: 'eventDetail',
            component: EventDetail,
            meta: {
                level: 5
            }
        }, {
            path: '/eventSearch',
            name: 'eventSearch',
            component: EventSearch,
            meta: {
                level: 3
            }
        }, {
            path: '/pass',
            name: 'pass',
            component: Pass,
            meta: {
                level: 2
            }
        }, {
            path: '/passModify',
            name: 'passModify',
            component: PassModify,
            meta: {
                level: 3
            }
        }, {
            path: '/passModify1',
            name: 'passModify1',
            component: PassModify1,
            meta: {
                level: 4
            }
        }, {
            path: '/passEdit',
            name: 'passEdit',
            component: PassEdit,
            meta: {
                level: 3
            }
        }, {
            path: '/passForget',
            name: 'passForget',
            component: PassForget,
            meta: {
                level: 3
            }
        }, {
            path: '/noticeList',
            name: 'noticeList',
            component: NoticeList,
            meta: {
                level: 2
            }
        }, {
            path: '/noticeInfo',
            name: 'noticeInfo',
            component: NoticeInfo,
            meta: {
                level: 3
            }
        }, {
            path: '/help',
            name: 'help',
            component: Help,
            meta: {
                level: 2
            }
        }, {
            path: '/helpInfo',
            name: 'helpInfo',
            component: HelpInfo,
            meta: {
                level: 4
            }
        },{
            path: '/platInfo',
            name: 'platInfo',
            component: PlatInfo,
            meta: {
                level: 3
            }
        }, {
            path: '/passForget1',
            name: 'passForget1',
            component: PassForget1,
            meta: {
                level: 4
            }
        }, {
            path: '/well',
            name: 'well',
            component: Well
        }]
})
